package com.wangzh.jvm;

public class Demo {

    public static void main(String[] args) {
        //默认计算机的1/4
        long l = Runtime.getRuntime().maxMemory();
        System.out.println(l/(1024*1024));
        //默认计算机的1/64
        long total = Runtime.getRuntime().totalMemory();
        System.out.println(total/(1024*1024));

//        -Xmx200m -Xms100m  -XX:+PrintGCDetails
    }
}
